<template>
  <div class="module-item">
    <CarTotal v-if="data.method == 'PeoplePassTotal'" />
    <EnergyTotal v-if="data.method == 'EnergyTotal'" />
    <EventTotal v-if="data.method == 'EventTotal'" />
    <EquipmentOperation v-if="data.method == 'IotCountTotal'" />
    <EnvironmentTotal v-if="data.method == 'TVOCList'" />
    <TenantTotal v-if="data.method == 'TenantTotal'" />
    <BuildingTotal v-if="data.method == 'BuildingTotal'" />
    <RentRateTotal v-if="data.method == 'RentRateTotal'" />
    <IndustryTotal v-if="data.method == 'IndustryTotal'" />
    <MeetingRoomUseRate v-if="data.method == 'MeetingroomTotal'" />
  </div>
</template>

<script>
import {
  defineComponent,
  reactive,
  toRefs,
  computed,
  watch,
  toRaw,
  ref,
  nextTick,
} from "vue";
import request from "../../../../common/utils/request";
import store from "../../../../store/index";
import { useRoute, useRouter } from "vue-router";
import utils from "../../../../common/utils/utils";
import { Modal, notification, message } from "ant-design-vue";
// 能耗统计
import EnergyTotal from "../synthetical/EnergyTotal.vue";
// 事件统计
import EventTotal from "../synthetical/EventTotal.vue";
// 设备运行
import EquipmentOperation from "../synthetical/EquipmentOperation.vue";
// 会议室使用率
import MeetingRoomUseRate from "../synthetical/MeetingRoomUseRate.vue";
// 人车数量
import CarTotal from "../synthetical/CarTotal.vue";
// 室内环境质量统计
import EnvironmentTotal from "../synthetical/EnvironmentTotal.vue";
// 租客数据
import TenantTotal from "../synthetical/TenantTotal.vue";
// 楼宇数据
import BuildingTotal from "../synthetical/BuildingTotal.vue";
// 入驻率走势
import RentRateTotal from "../synthetical/RentRateTotal.vue";
// 行业分析
import IndustryTotal from "../synthetical/IndustryTotal.vue";

export default defineComponent({
  name: "ModuleItem",
  components: {
    EnergyTotal,
    EventTotal,
    EquipmentOperation,
    EnvironmentTotal,
    CarTotal,
    TenantTotal,
    BuildingTotal,
    RentRateTotal,
    IndustryTotal,
    MeetingRoomUseRate,
  },
  props: {
    data: {
      type: Object,
      default: () => {},
    },
  },

  setup(props, context) {
    const route = useRoute();
    const router = useRouter();
    const state = reactive({});

    const init = () => {};

    init();

    return {
      ...toRefs(state),
    };
  },
});
</script>

<style lang="less" scoped>
.module-item {
  width: 100%;
  height: 100%;
}
</style>
